package cn.dnui_zjq823.dnuifood_16110100823.model;

import java.util.List;

import cn.dnui_zjq823.dnuifood_16110100823.bean.CommentBean;
import cn.dnui_zjq823.dnuifood_16110100823.iface.CommentIface;
import cn.dnui_zjq823.dnuifood_16110100823.listener.onRetrofitListener;
import cn.dnui_zjq823.dnuifood_16110100823.service.CommentService;
import retrofit2.Call;

/**
 * Created by dell on 2018/12/10.
 */

public class CommentModel extends BaseModel implements CommentIface {
    private CommentService service;
    @Override
    public void getAllCommentsByFood(int food_id, final onRetrofitListener listener) {
        service = retrofit.create(CommentService.class);
        Call<List<CommentBean>> call = service.getAllCommentsByFood(food_id);
        bindCallback(call, listener, 5);
    }
}
